import {
  adminController,
  Get,
  Log
} from '../../decorator/router'
import {userController} from '../../service/admin/user'

@adminController('/login')
export default class LoginRouter {
  @Get('/verify')
  @Log
  async adminLogin (ctx, next) {
    const { account, pwd } = ctx.query
    const user = await userController.create(account, pwd)

    ctx.body = {
      success: true,
        data: {
          username: account
        }
    }
  }

}